package com.naiterui.ehp.bs.b2c.product.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <pre>
 *      药品默认用法用量
 * </pre>
 *
 * @author 王泽浩
 * @date 2019-06-21 10:57
 * @since 1.0.0
 */
@Data
@Entity
@NoArgsConstructor
@Table(name = "p_medicine_default_usage")
public class MedicineDefaultUsage implements java.io.Serializable {

    private static final long serialVersionUID = -553307489315049468L;
    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 药品skuId
     */
    @Column(name = "sku_id")
    private Long skuId;

    /**
     * 频次周期：几月、几日 、几小时:有0.5的情况（用药周期最大值）
     */
    @Column(name = "dosage_cycle")
    private Integer dosageCycle;

    /**
     * 频次单位：日、隔日、小时、周、月等
     */
    @Column(name = "dosage_cycle_unit")
    private String dosageCycleUnit;

    /**
     * 频次数:有若干次的情况
     */
    @Column(name = "dosage_count")
    private Integer dosageCount;

    /**
     * 每次几片,几毫克,几粒等等:有适量的情况
     */
    @Column(name = "each_dosage_count")
    private String eachDosageCount;

    /**
     * 服用药品单位
     */
    @Column(name = "each_dose_unit")
    private String eachDoseUnit;

    /**
     * 服用时间
     */
    @Column(name = "usage_time")
    private String usageTime;

    /**
     * 服用方式
     */
    @Column(name = "usage_method")
    private String usageMethod;

    /**
     * 最小规格包装数（如：一盒有多少片 ）
     */
    @Column(name = "packag_spec")
    private Integer packagSpec;

    /**
     * 药品单位:盒、瓶
     */
    @Column(name = "quantity_unit")
    private String quantityUnit;

    /**
     * 频次最大值
     */
    @Column(name = "frequency_max")
    private Integer frequencyMax;

    /**
     * 频次最小值
     */
    @Column(name = "frequency_min")
    private Integer frequencyMin;

    /**
     * 剂量最大值
     */
    @Column(name = "dose_max")
    private Double doseMax;

    /**
     * 剂量最小值
     */
    @Column(name = "dose_min")
    private Double doseMin;

    /**
     * 用药周期最大值
     */
    @Column(name = "medication_cycle_max")
    private Integer medicationCycleMax;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 乐观锁
     */
    @Version
    @Column(name = "version")
    private Integer version;

}
